
package hxy.dragon.location_record.tencent;

import android.os.Bundle;

import com.tencent.map.geolocation.TencentLocation;
import com.tencent.map.geolocation.TencentPoi;

import java.util.List;

public class LocationModel implements TencentLocation {

    private Long userId;

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    private String provider;

    public void setProvider(String provider) {
        this.provider = provider;
    }

    @Override
    public String getProvider() {
        return this.provider;
    }

    private double latitude;

    public void setLatitude(double latitude) {
        this.latitude = latitude;
    }

    @Override
    public double getLatitude() {
        return this.latitude;
    }

    private double longitude;

    public void setLongitude(double longitude) {
        this.longitude = longitude;
    }

    @Override
    public double getLongitude() {
        return this.longitude;
    }

    private double altitude;

    public void setAltitude(double altitude) {
        this.altitude = altitude;
    }

    @Override
    public double getAltitude() {
        return this.altitude;
    }

    private float accuracy;

    public void setAccuracy(float accuracy) {
        this.accuracy = accuracy;
    }

    @Override
    public float getAccuracy() {
        return this.accuracy;
    }

    private String name;

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String getName() {
        return this.name;
    }

    private String address;

    public void setAddress(String address) {
        this.address = address;
    }

    @Override
    public String getAddress() {
        return this.address;
    }

    private String nation;

    public void setNation(String nation) {
        this.nation = nation;
    }

    @Override
    public String getNation() {
        return this.nation;
    }

    private String province;

    public void setProvince(String province) {
        this.province = province;
    }

    @Override
    public String getProvince() {
        return this.province;
    }

    private String city;

    public void setCity(String city) {
        this.city = city;
    }

    @Override
    public String getCity() {
        return this.city;
    }

    private String district;

    public void setDistrict(String district) {
        this.district = district;
    }

    @Override
    public String getDistrict() {
        return this.district;
    }

    private String town;

    public void setTown(String town) {
        this.town = town;
    }

    @Override
    public String getTown() {
        return this.town;
    }

    private String village;

    public void setVillage(String village) {
        this.village = village;
    }

    @Override
    public String getVillage() {
        return this.village;
    }

    private String street;

    public void setStreet(String street) {
        this.street = street;
    }

    @Override
    public String getStreet() {
        return this.street;
    }

    private String streetNo;

    public void setStreetNo(String streetNo) {
        this.streetNo = streetNo;
    }

    @Override
    public String getStreetNo() {
        return this.streetNo;
    }

    private Integer AreaStat;

    public void setAreaStat(Integer areaStat) {
        AreaStat = areaStat;
    }

    @Override
    public Integer getAreaStat() {
        return this.AreaStat;
    }

    private List<TencentPoi> poiList;

    public void setPoiList(List<TencentPoi> poiList) {
        this.poiList = poiList;
    }

    @Override
    public List<TencentPoi> getPoiList() {
        return this.poiList;
    }

    private float bearing;

    public void setBearing(float bearing) {
        this.bearing = bearing;
    }

    @Override
    public float getBearing() {
        return this.bearing;
    }

    private float speed;

    public void setSpeed(float speed) {
        this.speed = speed;
    }

    @Override
    public float getSpeed() {
        return speed;
    }

    private long time;

    public void setTime(long time) {
        this.time = time;
    }

    @Override
    public long getTime() {
        return this.time;
    }

    private long elapsedRealtime;

    public void setElapsedRealtime(long elapsedRealtime) {
        this.elapsedRealtime = elapsedRealtime;
    }

    @Override
    public long getElapsedRealtime() {
        return this.elapsedRealtime;
    }

    private int gpsRssi;

    public void setgPSRssi(int gpsRssi) {
        this.gpsRssi = gpsRssi;
    }

    @Override
    public int getGPSRssi() {
        return this.gpsRssi;
    }

    private String indoorBuildingId;

    public void setIndoorBuildingId(String indoorBuildingId) {
        this.indoorBuildingId = indoorBuildingId;
    }

    @Override
    public String getIndoorBuildingId() {
        return this.indoorBuildingId;
    }

    private String indoorBuildingFloor;

    public void setIndoorBuildingFloor(String indoorBuildingFloor) {
        this.indoorBuildingFloor = indoorBuildingFloor;
    }

    @Override
    public String getIndoorBuildingFloor() {
        return this.indoorBuildingFloor;
    }

    private int indoorLocationType;

    public void setIndoorLocationType(int indoorLocationType) {
        this.indoorLocationType = indoorLocationType;
    }

    @Override
    public int getIndoorLocationType() {
        return this.indoorLocationType;
    }

    private double direction;

    public void setDirection(double direction) {
        this.direction = direction;
    }

    @Override
    public double getDirection() {
        return this.direction;
    }

    private String cityCode;

    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }

    @Override
    public String getCityCode() {
        return this.cityCode;
    }

    private String cityPhoneCode;

    public void setCityPhoneCode(String cityPhoneCode) {
        this.cityPhoneCode = cityPhoneCode;
    }

    @Override
    public String getCityPhoneCode() {
        return this.cityPhoneCode;
    }

    private int coordinateType;

    public void setCoordinateType(int coordinateType) {
        this.coordinateType = coordinateType;
    }

    @Override
    public int getCoordinateType() {
        return this.coordinateType;
    }

    private int mockGps;

    public void setMockGps(int mockGps) {
        this.mockGps = mockGps;
    }

    @Override
    public int isMockGps() {
        return this.mockGps;
    }

    private Bundle extra;

    public void setExtra(Bundle extra) {
        this.extra = extra;
    }

    @Override
    public Bundle getExtra() {
        return this.extra;
    }

    public static LocationModel buildLocationModel(TencentLocation location, Long userId) {
        LocationModel locationModel = new LocationModel();
        locationModel.setProvider(location.getProvider());
        locationModel.setName(location.getName());
        locationModel.setAddress(location.getAddress());
        locationModel.setLatitude(location.getLatitude());
        locationModel.setLongitude(location.getLongitude());
        locationModel.setAltitude(location.getAltitude());
        locationModel.setAccuracy(location.getAccuracy());
        locationModel.setCityCode(location.getCityCode());
        locationModel.setAreaStat(location.getAreaStat());
        locationModel.setNation(location.getNation());
        locationModel.setProvince(location.getProvince());
        locationModel.setCity(location.getCity());
        locationModel.setDistrict(location.getDistrict());
        locationModel.setStreet(location.getStreet());
        locationModel.setStreet(location.getStreet());
        locationModel.setStreetNo(location.getStreetNo());
        locationModel.setTown(location.getTown());
        locationModel.setVillage(location.getVillage());
        locationModel.setBearing(location.getBearing());
        locationModel.setTime(location.getTime());
        locationModel.setPoiList(location.getPoiList());
        locationModel.setUserId(userId);
        return locationModel;
    }
}
